﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QuestFramework;
using QuestFramework.Combat;

namespace QuestFramework.Testing
{
    public partial class DiceTest : Form
    {
        public DiceTest()
        {
            InitializeComponent();
        }

        private void rollDiceButton_Click(object sender, EventArgs e)
        {
            Dice currentDice = new Dice();
            currentDice.NumberOfDice = int.Parse(numberOfDiceText.Text.Trim());
            currentDice.TypeOfDice = (DiceType)int.Parse(numberOfSidesText.Text.Trim());

            rollResultLabel.Text = currentDice.Roll().ToString();
        }

        private void combatButton_Click(object sender, EventArgs e)
        {
            CombatRules combat = new CombatRules();
            combat.PerformAttackCheck();

            attackRollLabel.Text = combat.LastAttackRoll.ToString();
            defenseRollLabel.Text = combat.LastDefenseRoll.ToString();
        }
    }
}
